package com.atguigu.day17.treeset.exer;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/21 10:10
 * @注释
 */
public class Student implements Comparable<Student>{
    String name;
    int age;
    double score;

    @Override
    public String toString() {
        return "Student [name=" + name + ", age=" + age + ", score=" + score + "]";
    }

    public Student(String name, int age, double score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    @Override
    public int compareTo(Student o) {
        return Integer.compare(this.age, o.age);
    }
}
